package com.ruoyi.system.service.impl;

import java.util.List;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.BodyInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TLeachRecordsMapper;
import com.ruoyi.system.domain.TLeachRecords;
import com.ruoyi.system.service.ITLeachRecordsService;

/**
 * 过滤记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-31
 */
@Service
public class TLeachRecordsServiceImpl implements ITLeachRecordsService 
{
    @Autowired
    private TLeachRecordsMapper tLeachRecordsMapper;

    /**
     * 查询过滤记录
     * 
     * @param id 过滤记录主键
     * @return 过滤记录
     */
    @Override
    public TLeachRecords selectTLeachRecordsById(Long id)
    {
        return tLeachRecordsMapper.selectTLeachRecordsById(id);
    }

    /**
     * 查询过滤记录列表
     * 
     * @param tLeachRecords 过滤记录
     * @return 过滤记录
     */
    @Override
    public List<TLeachRecords> selectTLeachRecordsList(TLeachRecords tLeachRecords)
    {
        return tLeachRecordsMapper.selectTLeachRecordsList(tLeachRecords);
    }

    /**
     * 新增过滤记录
     * 
     * @param tLeachRecords 过滤记录
     * @return 结果
     */
    @Override
    public int insertTLeachRecords(TLeachRecords tLeachRecords)
    {
        tLeachRecords.setCreateTime(DateUtils.getNowDate());
        return tLeachRecordsMapper.insertTLeachRecords(tLeachRecords);
    }

    /**
     * 修改过滤记录
     * 
     * @param tLeachRecords 过滤记录
     * @return 结果
     */
    @Override
    public int updateTLeachRecords(TLeachRecords tLeachRecords)
    {
        return tLeachRecordsMapper.updateTLeachRecords(tLeachRecords);
    }

    /**
     * 批量删除过滤记录
     * 
     * @param ids 需要删除的过滤记录主键
     * @return 结果
     */
    @Override
    public int deleteTLeachRecordsByIds(Long[] ids)
    {
        return tLeachRecordsMapper.deleteTLeachRecordsByIds(ids);
    }

    /**
     * 删除过滤记录信息
     * 
     * @param id 过滤记录主键
     * @return 结果
     */
    @Override
    public int deleteTLeachRecordsById(Long id)
    {
        return tLeachRecordsMapper.deleteTLeachRecordsById(id);
    }
}
